{% extends 'common/_base.html' %}
{% block title %}新建角色{% endblock %}
{% block localcss %}
    <link rel="stylesheet" href="/static/assets/vendors/select2/select2.min.css">
    <link rel="stylesheet" href="/static/assets/fonts/glyphicons/bootstrap-my.css">
    <link rel="stylesheet" href="/static/assets/vendors/jquery-bootstrap-duallistbox/bootstrap-duallistbox.css">
    <link rel="stylesheet" href="/static/assets/css/style.css">
{% endblock %}
{% block content %}
    <nav class="page-breadcrumb">
        <ol class="breadcrumb">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="/">首页</a></li>
                <li class="breadcrumb-item"><a href="/accounts/role/list/">角色列表</a></li>
                <li class="breadcrumb-item active" aria-current="page">新建角色</li>
            </ol>
        </ol>
    </nav>
    <div class="row">
        <div class="col-md-12 grid-margin stretch-card">
            <div class="card">
                <div class="card-body">

                    <h6 class="card-title">新建角色</h6>
                    <form method="post" class="forms-sample col-sm-6">
                        {{ form }}
                        <br><br>
                        <button type="submit" class="btn btn-primary mr-2">提交</button>
                        <a href="/accounts/role/list/" class="btn btn-warning" style="width: 50pt">返回</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
{% block localjs %}
    <script src="/static/assets/vendors/select2/select2.full.min.js"></script>
    <script src="/static/assets/js/select2.js"></script>

    <script src="/static/assets/vendors/jquery-bootstrap-duallistbox/jquery.bootstrap-duallistbox.js"></script>
    <script>
        var demo1 = $('select[name="external_permission"]').bootstrapDualListbox({
            nonSelectedListLabel: null,
            selectedListLabel: null,
            infoText: false,
            preserveSelectionOnMove: 'moved',
            moveOnSelect: false,
            showFilterInputs: false,
        });
    </script>
{% endblock %}